﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Settlement>" %>

<%@ Import Namespace="Complaint.Models.Dtos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <title>Settle a complaint</title>
    <meta name="description" content="settle a complaint on icomplain" />
    <meta name="keywords" content="complaint,settle,settlement" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <script src="<%=Url.Content("~/Scripts/Complaint/Views.Complaint.Settle.js")%>" type="text/javascript"></script>

    <% var complaint = (Complaint)ViewData["Complaint"];
       var settlementTypes = (IEnumerable<SettlementType>)ViewData["SettlementTypes"]; %>
    <h2>
        Settle complaint #<%= complaint.ComplaintID %>:
        <%= complaint.Title %></h2>
    <% using (Html.BeginForm())
       {%>
    <%= Html.ValidationSummary(false) %>
    <p>
        Note: * marked are required fields.</p>
    <fieldset>
        <legend>Fields</legend>
        <p>
            <%= Html.Label("SettlementTypeID")%>
            <em>*</em><%= Html.DropDownList("SettlementTypeID", new SelectList(settlementTypes, "SettlementTypeID", "Type"), "Please select")%>
            <%= Html.ValidationMessage("SettlementTypeID", "Field required")%>
        </p>
        <p>
            <%= Html.LabelFor(model => model.Amount) %>
            <em>&nbsp;</em><%= Html.TextBoxFor(model => model.Amount, new { @class = "number" }) %>
            <%= Html.ValidationMessageFor(model => model.Amount) %>
        </p>
        <p>
            <%= Html.LabelFor(model => model.Description) %>
            <em>&nbsp;</em><%= Html.TextAreaFor(model => model.Description, 5, 50, new { }) %>
            <%= Html.ValidationMessageFor(model => model.Description) %>
            <span>Note: Max length is 500 characters.</span>
        </p>
        <p>
            <%= Html.LabelFor(model => model.Feedback) %>
            <em>*</em><%= Html.TextAreaFor(model => model.Feedback, 5, 50, new { })%>
            <%= Html.ValidationMessageFor(model => model.Feedback, "Field required")%>
            <span>Note: Max length is 500 characters.</span>
        </p>
        <p>
            <%= Html.LabelFor(model => model.SatisfactionLevel) %>
            <%= Html.HiddenFor(model => model.SatisfactionLevel)%>
            <em>*</em><span id="satisfaction"></span>&nbsp;<span id="satisfaction-literal">Pleaes
                rate</span>
            <%= Html.ValidationMessageFor(model => model.SatisfactionLevel, "Field required")%>
        </p>
        <p>
            <button id="settle" class="formbutton">
                Settle</button>
        </p>
    </fieldset>
    <% } %>
</asp:Content>
